package com.hand.test.service.impl;/**
 * @author Estelle@앙수청
 * @date 2019/7/20 11:05
 */

import com.hand.test.domain.Matter;
import com.hand.test.domain.Stockin;
import com.hand.test.domain.Stockout;
import com.hand.test.mapper.StockInAndOutMapper;
import com.hand.test.service.StockInAndOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *  @author Estelle@앙수청
 *  @date 2019/7/20 11:05
 */
@Service
public class StockInAndOutServiceImpl implements StockInAndOutService {

    @Autowired
    private StockInAndOutMapper stockInAndOutMapper;

    @Override
    public Matter queryMatterExistByStore(Integer id) {
        return stockInAndOutMapper.queryMatterExistByStore(id);
    }

    @Override
    public Integer addStockin(Stockin stockin) {
        return stockInAndOutMapper.addStockin(stockin);
    }

    @Override
    public void increMatterStockCount(Stockin stockin) {
        stockInAndOutMapper.increMatterStockCount(stockin);
    }

    @Override
    public Integer addStockout(Stockout stockout) {
        return stockInAndOutMapper.addStockout(stockout);
    }

    @Override
    public void decreMatterStockCount(Stockout stockout) {
        stockInAndOutMapper.decreMatterStockCount(stockout);
    }

    @Override
    public List<Stockin> queryAllStockin() {
        return stockInAndOutMapper.queryAllStockin();
    }

    @Override
    public List<Stockin> queryAllStockout() {
        return stockInAndOutMapper.queryAllStockout();
    }
}
